package com.medical.data.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import java.util.List;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class FormItemVo {
    @ApiModelProperty(value = "模版表单id")
    private String formTemplateId;

    @Pattern(regexp = "^\\S{1,10}$")
    @ApiModelProperty(value = "名称")
    private String label;

    @ApiModelProperty(value = "输入型，选择型等")
    private String itemType;

    @ApiModelProperty(value = "0为非必填")
    private Integer required;

    @ApiModelProperty(value = "提示型数据")
    private String placeholder;

    @ApiModelProperty(value = "表单样式")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> scheme;

    @ApiModelProperty(value = "正则表达式")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Map<String, Object>> regList;

    @ApiModelProperty(value = "展示类型组件")
    private Boolean isDisplayType;

    @ApiModelProperty(value = "隐藏类型组件")
    private Boolean isHideType;

    @ApiModelProperty(value = "特殊处理类型")
    private Boolean isSpecialType;

    @ApiModelProperty(value = "是否显示标签")
    private Boolean showLabel;

    @ApiModelProperty(value = "表单项默认值")
    private String defaultValue;

    @ApiModelProperty(value = "排序")
    private Long sort;

    @ApiModelProperty(value = "栅格宽度")
    private Integer span;


}
